package May15ch17ex1;

import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

public class MyClient {
	public static void main(String[] args) throws UnknownHostException,
			IOException {
		Socket client = null;
		int port = 1234;
		client = new Socket(InetAddress.getLocalHost(), port);
		OutputStream outputStream = client.getOutputStream();
		PrintWriter PW = new PrintWriter(outputStream, true);

		String message = "Hello World. done";
		PW.println(message);
		client.close();
		outputStream.close();
	}
}
